<!--suppress ALL -->
<include file="./Template/header.html" />

<link rel="stylesheet" type="text/css" href="/Template/css/activityDetail.css">
<script src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript">

	$(function() {

		//初始化页面配置
//		document.title = "活动详情页";
        document.title = "{$activity.title}";

		var app = new Vue({
			el: '#container',
			data: {
				productList: [],
			},
			methods: {
				join: function(id) {
					window.location.href = "/wechat/activity/activityPay/id/"+id;
				}
			}
		})

		$('.activity-attention p img').css({
			width: "100%",
			margin: "10px 0"
		});

		$('.activity-attention p span img').css({
			width: "100%",
			margin: "10px 0"
		});

		$('.activity-attention ul, .activity-attention ol').css({
			"padding-left":"1.2rem"
		});

		$(".pop-frame").click(function() {
			$(".subscribe").hide();
		});

		setTimeout(function() {
			$('table').css({
				width: "100%"
			});

			var fullWidth = $(".activity-attention").width();

			$("iframe").each(function() {
				var originSrc = $(this).attr("src").split("&",1)[0];
				var newSrc = originSrc + "&width=" + fullWidth + "&height=280&auto=0";
				$(this).css("width", fullWidth+"px");
				$(this).attr("src", newSrc);
				$(this).css("height", "280px");
			});

		}, 500);

	});


</script>

<div class="container">
	<div class="bg-img">
		<img  style="height: auto;" src="{$activity.title_image}" alt="">
	</div>
	<div class="activity-info" v-if="{$activity.activity_type} < 3">
		<div class="apply-button">
			<if condition="$joined eq true">
				<img class="have-apply active" src="/Template/images/icon-haveApply.png" alt="">
			<else/>
				<if condition="$activity['status'] eq -1">
					<button class="apply-now active" v-on:click="join({$activity.activity_id})">立即报名</button>
				<elseif condition="$activity['status'] eq 1"/>
					<img class="apply-full active" src="/Template/images/icon-applyFull.png" alt="">
				<elseif condition="$activity['status'] eq 2"/>
					<img class="apply-end active" src="/Template/images/icon-applyEnd.png" alt="">
				</if>
			</if>
		</div>
		<if condition="$activity['activity_type'] eq 1">
			<p class="activity-title">{$activity.title}</p>
			<p class="activity-detail"><img class="pic" src="/Template/images/icon-time.png" alt="">时间：<span class="activity-date">{$activity.day}  {$activity.time}</span></p>
			<p class="activity-detail"><img class="pic" src="/Template/images/icon-address.png" alt="">地点：{$activity.location}</p>
			<!--p class="activity-detail"><img class="pic" src="/Template/images/icon-user.png" alt="">人数：<span class="wanted-number">{$activity.upper_limit}</span>人（已报名 <span class="actual-number">{$activity.join_number}</span>人）</p-->
			<p class="activity-detail"><img class="pic" src="/Template/images/icon-bag.png" alt="">费用：	<span class="fee-per-user">{$activity.price}元/人</span></p>
			<p class="activity-detail"><img class="pic" src="/Template/images/icon-phone.png" alt="">联系方式：<span class="phone-number">{$activity.contact}</span></p>
			<p class="activity-detail">
				<img class="pic" src="/Template/images/icon-point.png" alt="">
				<if condition="$end eq 1">
					活动报名已截止
				<else/>
					距离报名截至还有
					<span class="remain-time">{$activity.day_gap}</span>天
				</if>
			</p>
		</if>
	</div>
	<div class="activity-attention">
		{$activity.description}
	</div>
	<!--if condition="$customer['subscribe'] neq 1">
		<div class="subscribe">
			<div class="pop-frame">
				<div class="hint">
					<div class="line"></div>
					<p class="rec-title">无法识别二维码?</p>
					<ul>
						<li>1、打开微信,点击添加朋友</li>
						<li>2、搜索微信号:xwkkffj</li>
						<li>3、点击”关注”,完成</li>
					</ul>
				</div>
			</div>
			<div class="two-d-code">
				<img class="two-d-code-bg" src="/Template/images/doc-2d-code-bg.png" alt="">
				<img class="two-d-code-img" src="/Template/images/xwk-qrcode.jpg" alt="">
				<p class="recognize">
					长按图片[识别二维码]关注公众号
				</p>
			</div>
		</div>
	</if-->
</div>
<include file="./Template/footer.html" />

